<?php
include('top.php');
require_once('pasmy/dbwaarden.php');
if(empty($_SESSION['taal'])) {
	session_destroy();
		Header( "HTTP/1.1 301 Moved Permanently" );
		 
		Header( "Location: login.php" ); 
}
$mysql_id = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($db, $mysql_id);
?>
<table align="center" border="1" cellpadding="5">
<tr>
<td width="20" class="center"><a href="contact2.php?letter=A" class="linkblue">A</a></td>
<td width="20" class="center"><a href="contact2.php?letter=B" class="linkblue">B</a></td>
<td width="20" class="center"><a href="contact2.php?letter=C" class="linkblue">C</a></td>
<td width="20" class="center"><a href="contact2.php?letter=D" class="linkblue">D</a></td>
<td width="20" class="center"><a href="contact2.php?letter=E" class="linkblue">E</a></td>
<td width="20" class="center"><a href="contact2.php?letter=F" class="linkblue">F</a></td>
<td width="20" class="center"><a href="contact2.php?letter=G" class="linkblue">G</a></td>
<td width="20" class="center"><a href="contact2.php?letter=H" class="linkblue">H</a></td>
<td width="20" class="center"><a href="contact2.php?letter=I" class="linkblue">I</a></td>
<td width="20" class="center"><a href="contact2.php?letter=J" class="linkblue">J</a></td>
<td width="20" class="center"><a href="contact2.php?letter=K" class="linkblue">K</a></td>
<td width="20" class="center"><a href="contact2.php?letter=L" class="linkblue">L</a></td>
<td width="20" class="center"><a href="contact2.php?letter=M" class="linkblue">M</a></td>
</tr>
<tr>
<td width="20" class="center"><a href="contact2.php?letter=N" class="linkblue">N</a></td>
<td width="20" class="center"><a href="contact2.php?letter=O" class="linkblue">O</a></td>
<td width="20" class="center"><a href="contact2.php?letter=P" class="linkblue">P</a></td>
<td width="20" class="center"><a href="contact2.php?letter=Q" class="linkblue">Q</a></td>
<td width="20" class="center"><a href="contact2.php?letter=R" class="linkblue">R</a></td>
<td width="20" class="center"><a href="contact2.php?letter=S" class="linkblue">S</a></td>
<td width="20" class="center"><a href="contact2.php?letter=T" class="linkblue">T</a></td>
<td width="20" class="center"><a href="contact2.php?letter=U" class="linkblue">U</a></td>
<td width="20" class="center"><a href="contact2.php?letter=V" class="linkblue">V</a></td>
<td width="20" class="center"><a href="contact2.php?letter=W" class="linkblue">W</a></td>
<td width="20" class="center"><a href="contact2.php?letter=X" class="linkblue">X</a></td>
<td width="20" class="center"><a href="contact2.php?letter=Y" class="linkblue">Y</a></td>
<td width="20" class="center"><a href="contact2.php?letter=Z" class="linkblue">Z</a></td>
</tr>
</table>
<br /><br /> 
<?php
if(isset($_GET["letter"])) {
	$letter = $_GET["letter"];
	//echo "&nbsp;&nbsp;&nbsp;<h2>$letter</h2><br>";
	$sql = "select * from `contacten` order by `firma`";
	$res = mysql_query($sql, $mysql_id);
	while ($row = mysql_fetch_row($res)) {
		$myteken = $row[2];
		$vergelijk = $myteken[0];
		if($vergelijk == $letter) {
			echo "<strong>";
			if($row[2] != "&nbsp;") {echo "$row[2]<br>";}
			if($row[0] != "&nbsp;") {echo "$row[0] ";}
			if($row[1] != "&nbsp;") {echo "$row[1] <br>";}
			if($row[3] != "&nbsp;") {echo "Tel : $row[3] <br>";}
			if($row[4] != "&nbsp;") {echo "Fax : $row[4]<br>";}
			if($row[5] != "&nbsp;") {echo "Remarques : $row[5]<br>";}
			if($row[6] != "&nbsp;") {echo "Email : <a href=mailto:$row[6] class='email'>$row[6]</a><br>";}
			echo "</strong><br><hr>";
			} 
	
	}	
 

}
include('footer.php');
?>